<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js"></script>
    <script src="https://cdn.bootcss.com/echarts/3.7.1/echarts.min.js"></script>
</head>
<style>
    * {
        margin: 0;
        padding: 0;
    }

    body {
        background: -webkit-linear-gradient(pink, deepskyblue);
    }

    .w {
        width: 1200px;
        height: auto;
        margin: auto;
    }

    .box {
        height: 60px;
        margin-top: 60px;
        display: flex;
        justify-self: center;
    }

    .box input {
        width: 800px;
        height: 50px;
        border: 1px solid pink;
        font-size: 26px;
        padding-left: 15px;

    }

    .box #btn {
        width: 80px;
        height: 50px;
        background: deepskyblue;
        cursor: pointer;
    }

    #data {
        height: 600px;
        margin-top: 60px;
        border: 1px solid pink;
    }

</style>
<body>
<div class='box w'>
    <input type="text" placeholder="请输入" value="512480"></input>
    <button id="btn">搜索</button>
</div>
<div id="data" class="w"></div>
</body>
<script>
    $('#btn').click(function () {
        var text = $('.box input').val();
        Data = {'data': text}
        $.ajax({
            url: '/get',
            type: 'GET',
            data: Data,
            success: function (res) {
                console.log(res)
                if (res.success === '0') {
                    option.xAxis.data = res.data.time;
                    option.series[0].data = res.data.price;
                    option.title.text = res.data.title
                    ff.setOption(option)
                } else {
                    console.log("error")
                }
            }
        })
    })
</script>
<script src='../static/tt.js'>

</script>
</html>